package com.neuralnoise;

import org.apache.log4j.Logger;

import com.neuralnoise.hibernate.HibernateSessionFactory;

public abstract class AbstractDB {

	private static Logger logger = Logger.getLogger(AbstractDB.class);
	
	static {
		Runtime.getRuntime().addShutdownHook(new Thread() {
			public void run() {
				logger.debug("Shutting down...");
				HibernateSessionFactory.closeSession();
			}
		});
	}
	
}
